/* 路由匹配规则 */
import { RouteRecordRaw } from 'vue-router'
export const routes: Array<RouteRecordRaw> = [
  { path: '/', redirect: '/login' },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/Login/index.vue'),
  },
  {
    path: '/home',
    name: 'name',
    component: () => import('@/views/Layout/index.vue'),
    children: [
      {
        path: '/home',
        component: () => import('@/views/Home/index.vue'),
      },
      {
        path: '/user',
        name: 'permission',
        component: () => import('@/views/permission/user/index.vue'),
      },
      {
        path: '/role',
        name: 'role',
        component: () => import('@/views/permission/role/index.vue'),
      },
      {
        path: '/menu',
        name: 'menu',
        component: () => import('@/views/permission/menu/index.vue'),
      },
      {
        path: '/brand',
        name: 'brand',
        component: () => import('@/views/goods/brand/index.vue'),
      },
      {
        path: '/attribut',
        name: 'attribut',
        component: () => import('@/views/goods/trait/index.vue'),
      },
      {
        path: '/sku',
        name: 'sku',
        component: () => import('@/views/goods/sku/index.vue'),
      },
      {
        path: '/spu',
        name: 'spu',
        component: () => import('@/views/goods/spu/index.vue'),
      },
    ],
  },
  {
    path: '/cls',
    name: 'cls',
    component: () => import('@/views/screen/index.vue'),
  },
]
